package xcmg.device.dao.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import xcmg.device.dao.entity.purchase.PurchaseInboundDO;
import xcmg.device.service.vo.purchase.PurchaseInboundVO;

import java.util.List;

@Mapper
public interface PurchaseInboundMapper {
    int deleteByPrimaryKey(String id);

    int insert(PurchaseInboundDO record);

    PurchaseInboundDO selectByPrimaryKey(String id);

    int updateByPrimaryKey(PurchaseInboundDO record);

    List<PurchaseInboundDO> list(PurchaseInboundVO condition);

    PurchaseInboundDO findByInboundOrder(@Param("purchaseInboundOrder") String purchaseInboundOrder, @Param("orgId") String orgId);

    int findCountForExportAll(PurchaseInboundVO condition);

    int remove(@Param("ids") List<String> ids);

    List<PurchaseInboundDO> findForDeleteByIds(@Param("ids") List<String> ids);

    List<String> findOrderList(@Param("ids") List<String> ids);

    List<PurchaseInboundDO> findPurchaseNoList(@Param("ids") List<String> ids);

    int updateStatus(@Param("status") int status ,@Param("billNo") String billNo);

    int findNumByRequestOrder(@Param("purchaseRequestOrder") String purchaseRequestOrder, @Param("orgId") String orgId);

    List<PurchaseInboundDO> listForSap();
    
    PurchaseInboundDO findPurchaseOrderBySendOrder(@Param("sendOrder")String sendOrder, @Param("orgId")String orgId);
}